package com.guangfeng.yql.comm.netty.chatroom;

import com.guangfeng.yql.comm.netty.annotation.ANettyMessage;
import com.guangfeng.yql.comm.netty.enumerate.NettyMessageType;
import com.guangfeng.yql.comm.netty.message.NettyMessage;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;
import org.springframework.stereotype.Component;

@ANettyMessage(NettyMessageType.chatRoot)
@Component
public class ChatRoomMessage extends NettyMessage {

    @Override
    public void tactics(ChannelHandlerContext ctx, TextWebSocketFrame msg) {
        ChatRoomMessage message = ChatRoomMessageFactory.getChatRoomMessage(msg);
        message.tactics(ctx, msg);
    }
}
